﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;

namespace XTools.App_Code
{
    public class ClientsConfig
    {
        public static readonly string ApplicationFilePath = Application.ExecutablePath;
        public static readonly string TrueFilePath = Path.GetDirectoryName(ApplicationFilePath);
        public static readonly string XTools_ini = TrueFilePath + "\\Config\\XTools.ini";           //"\\Config.ini";
        public static readonly string LinkDataPath = TrueFilePath + "\\linkdata.ini";
        public static readonly string FieldsPath = TrueFilePath + "\\fields.ini";
        public static readonly string OpenFilePath = OperateIniFile.ReadIniData("version", "OpenFilepath", "", ClientsConfig.XTools_ini);
        public static readonly string StationsPath = OpenFilePath + "\\stations.ini";
        public static readonly string currentVersion = OperateIniFile.ReadIniData("version", "openTableVersion", "", ClientsConfig.XTools_ini);
        public static void ProcessStart(string str)
        {
            try
            {
                Process.Start(str);
            }
            catch (Exception)
            {
                MessageBox.Show("启动失败，请检查您是否安装该软件！");
            }
        }
    }
}